﻿@model Resto.CostControl.Core.WeekDishOrder
<div class="pageContent">
    @using (Html.DWZBeginForm())
    { 
        <div class="pageFormContent" layouth="56">
            @Html.HiddenFor(model => model.Id)
            @Html.DWZTextBoxFor(model => model.Name).Required()
            @Html.DWZTextBoxFor(model => model.Code).Required()
            @Html.DWZTextBoxFor(model => model.TotalCost).Number().Required()
            @Html.DWZTextBoxFor(model => model.TotalPrice).Number().Required()
            @Html.DWZDateFor(model => model.BeginDate).Required()
            @Html.DWZDateFor(model => model.EndDate).Required()
            @Html.DWZDropDownListFor(model => model.SiteId, "ProjectSite").Required()
            @Html.DWZTextBoxFor(model => model.ReportUserName).Required()
            @Html.DWZDateFor(model => model.ReportDate).Required()
            <div class="divider">
            </div>
            <div class="tabs">
                <div class="tabsHeader">
                    <div class="tabsHeaderContent">
                        <ul>
                            <li class="selected"><a href="javascript:;"><span>周一菜单</span></a></li>
                            <li><a href="javascript:;"><span>周二菜单</span></a></li>
                            <li><a href="javascript:;"><span>周三菜单</span></a></li>
                            <li><a href="javascript:;"><span>周四菜单</span></a></li>
                            <li><a href="javascript:;"><span>周五菜单</span></a></li>
                        </ul>
                    </div>
                </div>
                <div class="tabsContent" style="height: 160px;">
                    <div>
                        <table class="list nowrap itemDetail" addbutton="新建菜肴" width="100%">
                            <thead>
                                <tr>
                                    <th type="lookup" name="dwz.MON[#index#].Code" lookupgroup="MON[#index#]"
                                        lookupurl="@Url.Action("LookupDish", "Dish")" size="8">
                                        编号
                                    </th>
                                    <th type="text" name="dwz.MON[#index#].Name" size="15" fieldclass="required">
                                        名称
                                    </th>
                                    <th type="text" name="dwz.MON[#index#].Category" size="8">
                                        类别
                                    </th>
                                    <th type="text" name="dwz.MON[#index#].Count" size="6" fieldclass="number">
                                        客数
                                    </th>
                                    <th type="text" name="dwz.MON[#index#].DishCost" size="8">
                                        成本价格
                                    </th>
                                    <th type="text" name="dwz.MON[#index#].TotalCost" size="8">
                                        成本总价
                                    </th>
                                    <th type="text" name="dwz.MON[#index#].DishPrice" size="8">
                                        销售价格
                                    </th>
                                    <th type="text" name="dwz.MON[#index#].TotalPrice" size="8">
                                        销售总价
                                    </th>
                                    <th type="del" width="25">
                                        <hi:text key="操作" />
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                @for (int index = 0; index < Model.MON.Count; index++)
                                {
                                    Resto.CostControl.Core.DishOrderItem item = Model.MON[index];
                                    <tr class="unitBox">
                                        <td>
                                            @Html.Hidden("MON[" + index + "].id", item.DishId)
                                            @Html.TextBox("dwz.MON[" + index + "].Code", item.Code, new { size = "8" })
                                            <a title="查找带回" lookupgroup="MON[@index]" href="@Url.Action("LookupDish", "Dish")" class="btnLook">
                                                查找带回</a>
                                        </td>
                                        <td>
                                            @Html.TextBox("dwz.MON[" + index + "].Name", item.Name, new { size = "15" })
                                        </td>
                                        <td>
                                            @Html.TextBox("dwz.MON[" + index + "].Category", item.Category, new { size = "8" })
                                        </td>
                                        <td>
                                            @Html.TextBox("dwz.MON[" + index + "].Count", item.Count, new { size = "6" })
                                        </td>
                                        <td>
                                            @Html.TextBox("dwz.MON[" + index + "].DishCost", item.DishCost, new { size = "8" })
                                        </td>
                                        <td>
                                            @Html.TextBox("dwz.MON[" + index + "].TotalCost", item.TotalCost, new { size = "8" })
                                        </td>
                                        <td>
                                            @Html.TextBox("dwz.MON[" + index + "].DishPrice", item.DishPrice, new { size = "8" })
                                        </td>
                                        <td>
                                            @Html.TextBox("dwz.MON[" + index + "].TotalPrice", item.TotalPrice, new { size = "8" })
                                        </td>
                                        <td>
                                            <a href="@Url.Action("DeleteItem")/@item.Id" class="btnDel" title="您确定要删除服务端的记录吗?">删除</a>
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                    <div>
                        周二
                    </div>
                    <div>
                        周三
                    </div>
                    <div>
                        周四
                    </div>
                    <div>
                        周五
                    </div>
                </div>
                <div class="tabsFooter">
                    <div class="tabsFooterContent">
                    </div>
                </div>
            </div>
        </div>
        @Html.DWZFormBar()
    }
</div>
